export const myInstanceOf = (target, origin) => {
    if (typeof target !== 'object' || origin === null) return false
    if (typeof origin !== 'function') {
        throw new TypeError('TypeErr: origin is not a function')
    }
    let proto = Object.getPrototypeOf(target)
    while (proto) {
        if (proto === origin.prototype) return true
        proto = Object.getPrototypeOf(proto)
    }
    return false
}